﻿<UserControl  x:Class="MemoBoss.DifficultySelect"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
    xmlns:local="clr-namespace:MemoBoss"
    mc:Ignorable="d"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    d:DesignWidth="480" d:DesignHeight="800">
    <UserControl.Resources>
        <local:AppSettings x:Key="appSettings"></local:AppSettings>
        <Storyboard x:Name="Push">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)" Storyboard.TargetName="btnOptionsGrid">
                <EasingDoubleKeyFrame KeyTime="0" Value="1"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.05" Value="0.9"/>

            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)" Storyboard.TargetName="btnOptionsGrid">
                <EasingDoubleKeyFrame KeyTime="0" Value="1"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.05" Value="0.9"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Name="Release">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)" Storyboard.TargetName="btnOptionsGrid">
                <EasingDoubleKeyFrame KeyTime="0" Value="0.9"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.05" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)" Storyboard.TargetName="btnOptionsGrid">
                <EasingDoubleKeyFrame KeyTime="0" Value="0.9"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.05" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Name="Hide">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="LayoutRoot">
                <EasingDoubleKeyFrame KeyTime="0" Value="1"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.X)" Storyboard.TargetName="LayoutRoot">
                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.4" Value="500"/>
            </DoubleAnimationUsingKeyFrames>
            <!--<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)" Storyboard.TargetName="LayoutRoot">
                <EasingDoubleKeyFrame KeyTime="0" Value="1"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.4" Value="0"/>
            </DoubleAnimationUsingKeyFrames>-->
            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="LayoutRoot">
                <DiscreteObjectKeyFrame KeyTime="0" >
                    <DiscreteObjectKeyFrame.Value>
                        <Visibility>Collapsed</Visibility>
                    </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
            </ObjectAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Name="Show"  Completed="Show_Completed">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="LayoutRoot">
                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.X)" Storyboard.TargetName="LayoutRoot">
                <EasingDoubleKeyFrame KeyTime="0" Value="500"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.4" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
            <!--<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)" Storyboard.TargetName="LayoutRoot">
                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.4" Value="1"/>
            </DoubleAnimationUsingKeyFrames>-->
            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="LayoutRoot">
                <DiscreteObjectKeyFrame KeyTime="0" >
                    <DiscreteObjectKeyFrame.Value>
                        <Visibility>Visible</Visibility>
                    </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
            </ObjectAnimationUsingKeyFrames>
        </Storyboard>
    </UserControl.Resources>
    <Grid x:Name="LayoutRoot" Loaded="LayoutRoot_Loaded" RenderTransformOrigin="0.5,0.5">
        <Grid.RenderTransform>
            <TranslateTransform/>
        </Grid.RenderTransform>
       
        <Grid x:Name="ContentPanel"  Margin="12,0,12,0" >
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="auto"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>

            <Grid x:Name="btnBack" Margin="10,10,10,10" Grid.Column="0" VerticalAlignment="Top"  Tap="btnBack_Tap">
                <Image   Stretch="None" Source="/Icons/appbar.back.rest.png"  HorizontalAlignment="Left" />
                <Image   Stretch="None" Source="/Icons/appbar.basecircle.rest.png"  HorizontalAlignment="Left" />
            </Grid>
            <!--ContentPanel - place additional content here-->
            <Grid   Grid.Column="1" Margin="12,0,12,0">
                <ScrollViewer     ScrollViewer.VerticalScrollBarVisibility="Hidden" Margin="0,0,0,10">
                    <Grid >
                        <Grid.RowDefinitions>
                            <RowDefinition Height="*"/>
                        </Grid.RowDefinitions>
                    <StackPanel >
                            <Grid Margin="30,20,30,0"  RenderTransformOrigin="0.5,0.5"  MouseLeftButtonDown="btn_MouseLeftButtonDown"  MouseLeave="btn_MouseLeave">
                                <Grid.RenderTransform>
                                    <ScaleTransform/>
                                </Grid.RenderTransform>
                                <Rectangle x:Name="btnEasy" Opacity="0.9" RenderTransformOrigin="0.5,0.5" Tap="btn_Tap">
                                    <Rectangle.Fill>
                                        <ImageBrush ImageSource="/Images/menu1.png" />
                                    </Rectangle.Fill>
                                </Rectangle>
                                <TextBlock Margin="20,20,20,20" FontSize="30" TextAlignment="Center" FontFamily="Fonts/OutlineTwelve.ttf#OutlineTwelve" IsHitTestVisible="False">Easy Peasy</TextBlock>
                            </Grid>

                            <Grid Margin="30,20,30,0"  RenderTransformOrigin="0.5,0.5"  MouseLeftButtonDown="btn_MouseLeftButtonDown"  MouseLeave="btn_MouseLeave">

                                <Grid.RenderTransform>
                                    <ScaleTransform/>
                                </Grid.RenderTransform>
                                <Rectangle  x:Name="btnMedium" RenderTransformOrigin="0.5,0.5" Opacity="0.9" Tap="btn_Tap">
                                    <Rectangle.Fill>
                                        <ImageBrush ImageSource="/Images/menu2.png" />
                                    </Rectangle.Fill>
                                </Rectangle>
                                <TextBlock Margin="20,20,20,20" FontSize="30" TextAlignment="Center" FontFamily="Fonts/OutlineTwelve.ttf#OutlineTwelve" IsHitTestVisible="False">Medium Pedium</TextBlock>
                            </Grid>

                            <Grid Margin="30,20,30,0" RenderTransformOrigin="0.5,0.5"  MouseLeftButtonDown="btn_MouseLeftButtonDown"  MouseLeave="btn_MouseLeave">
                                <Grid.RenderTransform>
                                    <ScaleTransform/>
                                </Grid.RenderTransform>
                                <Rectangle x:Name="btnHard" Opacity="0.9" RenderTransformOrigin="0.5,0.5" Tap="btn_Tap">
                                    <Rectangle.Fill>
                                        <ImageBrush ImageSource="/Images/menu3.png" />
                                    </Rectangle.Fill>
                                </Rectangle>
                                <Image x:Name="imgHardStop"  Margin="0,0,20,0" Source="/Images/stop.png"  Width="40" Height="40"   Stretch="UniformToFill" HorizontalAlignment="Right" IsHitTestVisible="False"/>
                                <TextBlock Margin="20,20,20,20" FontSize="30" TextAlignment="Center" FontFamily="Fonts/OutlineTwelve.ttf#OutlineTwelve" IsHitTestVisible="False">Hardy pardy</TextBlock>
                            </Grid>
                            <Grid Margin="30,20,30,0" RenderTransformOrigin="0.5,0.5"  MouseLeftButtonDown="btn_MouseLeftButtonDown"  MouseLeave="btn_MouseLeave">
                                <Grid.RenderTransform>
                                    <ScaleTransform/>
                                </Grid.RenderTransform>
                                <Rectangle x:Name="btnMemoBoss" Opacity="0.9" RenderTransformOrigin="0.5,0.5" Tap="btn_Tap">
                                    <Rectangle.Fill>
                                        <ImageBrush ImageSource="/Images/menu4.png" />
                                    </Rectangle.Fill>
                                </Rectangle>
                                <Image x:Name="imgMemoBossStop"  Margin="0,0,20,0" Source="/Images/stop.png"  Width="40" Height="40"   Stretch="UniformToFill" HorizontalAlignment="Right" IsHitTestVisible="False"/>
                                <TextBlock Margin="20,20,20,20" FontSize="30" TextAlignment="Center" FontFamily="Fonts/OutlineTwelve.ttf#OutlineTwelve" IsHitTestVisible="False">Memo Boss</TextBlock>
                            </Grid>
                        </StackPanel>
                    </Grid>
                </ScrollViewer>
            </Grid>
        </Grid>
    </Grid>
</UserControl>
